package com.uzai.common.enums;

/**
 * @Auther: xiaoyuexl
 * @Date: 2022/5/24 14:07
 * @Description: 群功能模块枚举
 */
public enum GroupFunEnum {
    GROUP_MANAGER("manager","群管功能"),
    GROUP_FANLI("fanli","返利功能"),
    GROUP_FREE("free","免单功能"),
    GROUP_FADAN("fadan","发单功能");

    public static final String GROUP_MANAGER_VALUE = "manager";
    public static final String GROUP_FANLI_VALUE = "fanli";
    public static final String GROUP_FREE_VALUE = "free";
    public static final String GROUP_FADAN_VALUE = "fadan";

    private String value;
    private String desc;

    GroupFunEnum(String value,String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static GroupFunEnum getValue(String value) {
        if (value == null) {
            return null;
        }
        for (GroupFunEnum type: GroupFunEnum.values()) {
            if (type.getValue().equals(value)) {
                return type;
            }
        }
        return null;
    }
}
